<b>II - Composição Familiar</b>
<table style="width: 100%;">
    <?php
    include_once '../Entidades/EntidadeBase.php';
    include_once '../Entidades/ComposicaoFamiliar.php';
    include_once '../Controles/Listas.php';

    $servicoComposicaoFamiliar = new ComposicaoFamiliar();
    $composicoesFamiliar = $servicoComposicaoFamiliar->ObterLista("id_Responsavel = $Responsavel->Id");
    ?>
    <table style="width: 100%; border: 1px solid black;" border="1">
        <tr>
            <th>Nº</th>
            <th>Nome</th>
            <th>Ocupação</th>
            <th>Salário</th>
            <th>Idade</th>
            <th>Parentesco</th>
            <th>Instrução</th>
            <th>Escola</th>
            <th>Estado Civil</th>
        </tr>

        <?php
        $i = 1;
        if ($composicoesFamiliar == NULL)
            $composicoesFamiliar = Array();

        foreach ($composicoesFamiliar as $composicaoFamiliar)
        {
            ?>
            <tr>
                <td style="text-align: center;"><b><?php echo $i; ?></b></td>
                <td><?php echo $composicaoFamiliar->Nome; ?></td>
                <td><?php echo $composicaoFamiliar->Ocupacao; ?></td>
                <td style="text-align: right;"><?php echo "R$ " . number_format($composicaoFamiliar->Salario, 2, ",", ".") ?></td>
                <td style="text-align: center;"><?php echo $composicaoFamiliar->getIdade(); ?></td>
                <td><?php echo $composicaoFamiliar->getNomeParentesco(FALSE); ?></td>
                <td><?php echo $composicaoFamiliar->getNomeInstrucao(FALSE); ?></td>
                <td><?php echo $composicaoFamiliar->Escola; ?></td>
                <td><?php echo $composicaoFamiliar->getNomeEstadoCivil(FALSE); ?></td>
            </tr>
            <?php
            $i++;
        }
        ?>

    </table>
</table>